package anthology.daily_question._25_03;
//https://leetcode.cn/problems/find-the-k-beauty-of-a-number/description/?envType=daily-question&envId=2025-03-10
public class _2269找到一个数字的K美丽值 {
    class Solution {
        public int divisorSubstrings(int num, int k) {
            String s = String.valueOf(num);
            int res = 0;
            for(int i=k; i<=s.length(); i++){
                int x = Integer.parseInt(s.substring(i-k, i));
                if(x > 0 && num % x == 0){
                    res++;
                }
            }
            return res;
        }
    }
}
